import 'package:flutter/material.dart';

class RadiusContainer extends StatelessWidget {
  Widget child;
  EdgeInsetsGeometry margin;
  double radius = 5.0;

  RadiusContainer({Key key, this.child, this.radius, this.margin})
      : assert(margin == null || margin.isNonNegative),super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: margin,
      padding: EdgeInsets.symmetric(horizontal: 15.0, vertical: 15.0),
      decoration: BoxDecoration(
        color: Colors.white,
        borderRadius: BorderRadius.circular(radius ?? 5.0),
      ),
      child: child,
    );
  }
}
